﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="MemberInfo.aspx.cs" Inherits="MemberInfo"
    Theme="DefaultSkin" %>

<%@ Register Src="Navigate.ascx" TagName="Navigate" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>个人信息</title>

    <script src="JS/My97DatePicker/WdatePicker.js"></script>

    <script src="JS/Function.js"></script>

    <script>
        function init() {
            show(document.getElementById("hdnType").value);
        }

        function show(type) {
            if (type == "1") {
                document.getElementById("divPwd").style.display = "block";
                document.getElementById("divInfo").style.display = "none";
            } else {
                document.getElementById("divPwd").style.display = "none";
                document.getElementById("divInfo").style.display = "block";
            }
        }
    </script>

</head>
<body style="text-align: center" onload="init()">
    <form id="form1" runat="server">
    <uc1:Navigate ID="Navigate1" runat="server" />
    <div style="width: 680px">
        <asp:HiddenField ID="hdnType" runat="server" Value="2" />
        <div style="width: 200px; float: left; text-align: left; margin-top: 20px;">
            <ul>
                <li style="line-height: 30px"><a href="javascript:void(0)" onclick="show(1)">修改密码</a></li>
                <li style="line-height: 30px"><a href="javascript:void(0)" onclick="show(2)">修改个人信息</a></li>
            </ul>
        </div>
        <div style="margin-top: 20px; display: none;" id="divInfo">
            <table cellpadding="0" cellspacing="0" border="0" style="line-height: 38px">
                <tr>
                    <td width="70px">
                        真实姓名&nbsp;&nbsp;
                    </td>
                    <td>
                        <asp:TextBox ID="txtRealName" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td width="70px">
                        居住城市&nbsp;&nbsp;<span style="color: Red">*</span>
                    </td>
                    <td>
                        <asp:TextBox ID="txtCity" runat="server"></asp:TextBox>&nbsp;&nbsp;
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="!"
                            ControlToValidate="txtCity" Display="Dynamic" ValidationGroup="Info"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td width="70px">
                        出生日期&nbsp;&nbsp;
                    </td>
                    <td>
                        <asp:TextBox ID="txtBirthDay" runat="server" onfocus="ShowCal();"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td width="70px">
                        邮箱&nbsp;&nbsp;
                    </td>
                    <td>
                        <asp:TextBox ID="txtEmail" runat="server"></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;&nbsp;
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ErrorMessage="格式不对"
                            ControlToValidate="txtEmail" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
                            Display="Static" ValidationGroup="Info"></asp:RegularExpressionValidator>
                    </td>
                </tr>
                <tr>
                    <td colspan="3">
                        <asp:Button ID="btnMemberInfo" runat="server" Text="提交" CommandName="Info" OnClick="btnMember_Click"
                            ValidationGroup="Info" />
                    </td>
                </tr>
            </table>
        </div>
        <div style="margin-top: 20px; display: none" id="divPwd">
            <table cellpadding="0" cellspacing="0" border="0" style="line-height: 38px">
                <tr>
                    <td width="70px">
                        旧密码&nbsp;&nbsp;
                    </td>
                    <td>
                        <asp:TextBox ID="txtOldPwd" runat="server" TextMode="Password"></asp:TextBox>&nbsp;&nbsp;
                    </td>
                    <td align="left">
                        &nbsp;&nbsp;
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="!"
                            ControlToValidate="txtOldPwd" Display="Dynamic" ValidationGroup="Pwd"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td width="70px">
                        新密码&nbsp;&nbsp;
                    </td>
                    <td>
                        <asp:TextBox ID="txtPwd" runat="server" TextMode="Password"></asp:TextBox>&nbsp;&nbsp;
                    </td>
                    <td align="left">
                        &nbsp;&nbsp;
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="!"
                            ControlToValidate="txtPwd" Display="Dynamic" ValidationGroup="Pwd"></asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ErrorMessage="密码由6-12位英文或数字组成"
                            ControlToValidate="txtPwd" ValidationExpression="^[a-z][a-z0-9]{5,11}$" Display="Static"
                            ValidationGroup="Pwd"></asp:RegularExpressionValidator>
                    </td>
                </tr>
                <tr>
                    <td width="70px">
                        重复新密码&nbsp;&nbsp;
                    </td>
                    <td>
                        <asp:TextBox ID="txtConfirmPwd" runat="server" TextMode="Password"></asp:TextBox>
                    </td>
                    <td align="left">
                        &nbsp;&nbsp;
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ErrorMessage="!"
                            ControlToValidate="txtConfirmPwd" Display="Dynamic" ValidationGroup="Pwd"></asp:RequiredFieldValidator>
                        <asp:CompareValidator ID="CompareValidator1" runat="server" ErrorMessage="两次密码输入不一样"
                            ControlToCompare="txtPwd" ControlToValidate="txtConfirmPwd" Display="Static"
                            ValidationGroup="Pwd"></asp:CompareValidator>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <asp:Button ID="btnPwd" runat="server" Text="提交" CommandName="Pwd" OnClick="btnMember_Click"
                            ValidationGroup="Pwd" />
                    </td>
                    <td>
                    </td>
                </tr>
            </table>
        </div>
    </div>
    </form>
</body>
</html>
